package chat1.client;

import javax.swing.*;
import java.awt.*;

public class RegWindow {

    JFrame  win=null;
    JPanel  contePane=null;
    JLabel  accountLabel=null;
    JTextField  account=null;
    JLabel  pwdLabel=null;
    JPasswordField  pwd=null;
    JLabel  rePwdLabel=null;
    JPasswordField  rePwd=null;
    JButton  regBtn=null;
    JButton  loginBtn=null;
    RegWindow(){
        win=new JFrame("注册窗口");//1.
        win.setSize(398,337);
        win.setResizable(false);
        contePane=new JPanel();//2.
        contePane.setLayout(null);

        accountLabel=new JLabel("账号：");
        accountLabel.setBounds( new Rectangle(15,31,357,47));
        accountLabel.setFont( new Font("Dialog",Font.BOLD,18) );
        contePane.add(accountLabel);

        account=new JTextField();
        account.setBounds(new Rectangle(110,34,258,35));
        contePane.add(account);

        pwdLabel=new JLabel("密码：");
        pwdLabel.setBounds(new Rectangle(15,94,357,47));
        pwdLabel.setFont( new Font("Dialog",Font.BOLD,18) );
        contePane.add(pwdLabel);

        pwd=new JPasswordField();
        pwd.setBounds(new Rectangle(110,97,258,35));
        contePane.add(pwd);

        rePwdLabel=new JLabel("重复密码：");
        rePwdLabel.setBounds( new Rectangle(15,162,357,47) );
        rePwdLabel.setFont(new Font("Dialog",Font.BOLD,18));
        contePane.add(rePwdLabel);

        rePwd=new JPasswordField();
        rePwd.setBounds(new Rectangle(110,165,258,35));
        contePane.add(rePwd);

        regBtn=new JButton("注册");
        regBtn.setBounds(new Rectangle(146,221,75,40));
        contePane.add(regBtn);


        loginBtn=new JButton("登录");
        loginBtn.setBounds(new Rectangle(275,260,68,20));
        contePane.add(loginBtn);

        win.add(contePane);
        win.setVisible(true);
    }
}

